]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Make the workspace added on the middle mouse button click active
authorMarina Zhurakhinskaya <marinaz@redhat.com>
Wed, 12 May 2010 19:19:40 +0000 (15:19 -0400)
committerMarina Zhurakhinskaya <marinaz@redhat.com>
Thu, 13 May 2010 18:30:52 +0000 (14:30 -0400)
This ensures that we launch the new instance of an application on the newly
added workspace in the grid view, in which we don't make the newly added
workspace active by default.

https://bugzilla.gnome.org/show_bug.cgi?id=591645

js/ui/appDisplay.js
js/ui/workspacesView.js

index 14a3e195ff13736f594ca8fc87a61f279af09cbe..29aeaa89111e380eeaa66d634ec946b7ee4847ba 100644 (file)
@@ -458,7 +458,8 @@ AppWellIcon.prototype = {
         if (button == 1) {
             this._onActivate(event);
         } else if (button == 2) {
-            Main.overview.workspaces.addWorkspace();
+            let newWorkspace = Main.overview.workspaces.addWorkspace();
+            newWorkspace.activate(global.get_current_time());
             this.emit('launching');
             this.app.open_new_window();
             Main.overview.hide();
index b34c222d0498b698ba0ada7b36043bdc9a1b8906..8624cee0c5e58eca7c1a018366f64605e411ae37 100644 (file)
@@ -445,7 +445,7 @@ MosaicView.prototype = {
     },
 
     addWorkspace: function() {
-        global.screen.append_new_workspace(false, global.get_current_time());
+        return global.screen.append_new_workspace(false, global.get_current_time());
     },
 
     canRemoveWorkspace: function() {
@@ -1395,6 +1395,7 @@ SingleView.prototype = {
         let ws = global.screen.append_new_workspace(false,
                                                     global.get_current_time());
         ws.activate(global.get_current_time());
+        return ws;
     },
 
     removeWorkspace: function() {